﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DCT.AutoUpdate.Code.Pipelines
{
    public class PinelineExecutorEventArgs : EventArgs
    {
        public PinelineExecutorEventArgs(PinelineExecutor source)
        {
            this.Source = source;
        }

        public PinelineExecutor Source { get; private set; }
    }

    public class PinelineExecutorItemsEventArgs : PinelineExecutorEventArgs
    {
        public PinelineExecutorItemsEventArgs(PinelineExecutor source, string key, ExecutorSkeleton item)
            : base(source)
        {
            this.Key = key;
            this.Item = item;
        }

        public string Key { get; private set; }

        public ExecutorSkeleton Item { get; private set; }
    }

    public class PinelineExecutorItemsRunResultEventArgs : PinelineExecutorItemsEventArgs
    {
        public PinelineExecutorItemsRunResultEventArgs(PinelineExecutor source, string key
            , ExecutorSkeleton item, bool result)
            : base(source, key, item)
        {
            this.Result = result;
        }

        public bool Result { get; private set; }
    }

    public class PinelineExecutorItemsErrorEventArgs : PinelineExecutorItemsEventArgs
    {
        public PinelineExecutorItemsErrorEventArgs(PinelineExecutor source, string key
            , ExecutorSkeleton item, Exception error)
            : base(source, key, item)
        {
            this.Error = error;
        }

        public Exception Error { get; private set; }
    }
}
